package com.heima.Controller;

import com.heima.Serivce.WemediaService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/wemedia/MEDIA/wemedia/")
public class WemediaController {
    @Autowired
    WemediaService wemediaService;

    @PostMapping("login/in")
    public ResponseResult Login(@RequestBody WmUser wmUser)
    {

        return wemediaService.Login(wmUser);
    }

//    没有写完
    @PostMapping("adduser")
    public ResponseResult Adduser(@RequestBody WmUser wmUser)
    {
        return wemediaService.AddUser(wmUser);
    }
}
